package com.example.liang.basamovie.activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;
import com.example.liang.basamovie.R;
public class WebBannerActivity extends AppCompatActivity {
    WebView webView;
    ImageView back;
    TextView subtitle,maintitle;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web_banner);
        back= (ImageView) findViewById(R.id.toolbar_back);
        webView= (WebView) findViewById(R.id.web_banner_image);
        subtitle= (TextView) findViewById(R.id.subtitle);
        maintitle= (TextView) findViewById(R.id.maintitle);
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        Intent intent=getIntent();
        String url=intent.getStringExtra("url");
        webView.loadUrl(url);
        String maTitle=intent.getStringExtra("maintitle");
        String subTitle=intent.getStringExtra("subtitle");
        maintitle.setText(maTitle);
        subtitle.setText(subTitle);
    }
}
